package elven.test.d.common.print;

import java.util.Scanner;

import elven.d.common.queue.sample.print.Printer;

public class PrintDemo {

	@SuppressWarnings("resource")
	public static void printMethod(){
		Scanner sn = new Scanner(System.in);
		while(true){
			System.out.print("input your printer text:");
			Printer.getInstance().setToPrint(sn.nextLine());
			System.out.println("is over?");
			if(sn.nextLine().equals("yes")){
				break;
			}
			System.out.println("=======================");
		}
	}
	
	public static void main(String[] args) {
		new Thread(new Runnable() {
			public void run() {
				Printer.getInstance().print();
			}
		}).start();
		printMethod();
	}
}
